import { randomString } from '@/utils/index.js';

// 图标枚举
export const iconLists = [
  {id: 1, url: require('assets/icon/icon01.png')},
  {id: 2, url: require('assets/icon/icon02.png')},
  {id: 3, url: require('assets/icon/icon03.png')},
  {id: 4, url: require('assets/icon/icon04.png')},
  {id: 5, url: require('assets/icon/icon05.png')},
  {id: 6, url: require('assets/icon/icon06.png')},
];

// 系统图数据结构
export const senceData = {
  // 雾化效果
  fov: {
    color: '#cccccc',
    near: 1, // 最近距离
    far: 1000, // 最远距离
    density: 0.01,
  },
  // 隐藏其他模型，凸显某些模型
  breakOutStateList: [
    // {
    //   name: '',
    //   showId: [], // 显示的模型
    //   hideId: [], // 隐藏的模型
    //   opacity: 0, // 隐藏时模型不透明度
    //   view: {}, // 场景视角
    // },
  ],
  // 字体绑定列表
  fontBindList: [
    // {
    //   text: '1#写字楼',
    //   style: {
    //     background: 'red',
    //     color: '#333',
    //     fontSize: '16px',
    //     fontWeight: 'bolder',
    //   },
    //   id: 1,
    //   data: [{ key: 'name', value: '张三' }],
    // },
  ],
  // 图标绑定
  iconBindList: [
    // {
    //   url: '~assets/icon/icon01.png',
    //   id: 1,
    //   data: [
    //     {key: 'name', value: '张三'}
    //   ]
    // },
  ], // 图标类型绑定
  breakStateList: [], // 故障状态绑定
  environment: 0, //0透明 1 白天  2 傍晚， 3，天黑
  // 场景巡更动画帧
  senceAnimate: [
    /*{
      id: 1,
      _viewImg: '1121', // 场景相机动画帧的截图
      _camera: {
        position: {
          x: 50,
          y: 50,
          z: -30
        },
        rotation: {
          x: 0,
          y: 0,
          z: -30
        }
      },
    },*/
  ],
  // 设备数据标识
  deviceData: [
    /*
    {
      name: '设备名称01',
      deviceId: 1, // 设备id
      modleId: 1, // 设备对应的3D模型id,
      animateId: 1, // 设备对应的动画id，用于当设备运行或者停止的时候查找播放对应动画
      deiveType: '电动阀', // 设备类型显示，用于设备归类，前端特殊处理对应的数据显示
      // 设备在三维空间显示对应的数据框点的位置
      position: {
        x: 50,
        y: 50,
        z: -30
      },
      // 设备三维空间对应的视图相机的位置，用于巡更或者点击对应的设备场景相机切换显示对应的视图
      _camera: {
        position: {
          x: 50,
          y: 50,
          z: -30
        },
        rotation: {
          x: ,
          y: 0,
          z: -30
        }
      },
      _viewImg: '', // 相机对应真的base64 图片
      // 信号点集合
      dataList: []
    }
    */
  ],
  camera: {
    fov: 45,
    aspect: 1,
    near: 1,
    far: 500,
    position: {
      x: 50,
      y: 50,
      z: -30,
    },
    rotation: {
      x: 0,
      y: 0,
      z: 0,
    },
    scale: {
      x: 1,
      y: 1,
      z: 1,
    },
  },
  modleData: [
    // {
    //   name: '水泵房模型3',
    //   userData: {
    //     modeId: 9999,
    //     is3Dmode: true,
    //     url: './static/models/水泵房模型3.gltf',
    //     // 模型动画绑定数据
    //     animate: [
    //       {singalId: [], animateIndex: 0}
    //     ]
    //   },
    //   scale: {
    //     x: 1,
    //     y: 1,
    //     z: 1,
    //   },
    //   position: {
    //     x: 0,
    //     y: 0,
    //     z: 0,
    //   },
    //   rotation: {
    //     x: 0,
    //     y: 0,
    //     z: 0,
    //   },
    // },
    // {
    //   name: '3d模型01',
    //   userData: {
    //     is3Dmode: true,
    //     url: './static/models/beng.gltf'
    //   },
    //   scale: {
    //     x: 1,
    //     y: 1,
    //     z: 1,
    //   },
    //   position: {
    //     x: 0,
    //     y: 0,
    //     z: 0,
    //   },
    //   rotation: {
    //     x: 0,
    //     y: 0,
    //     z: 0
    //   }
    // },
    // {
    //   name: '3d模型02',
    //   userData: {
    //     is3Dmode: true,
    //     url: 'https://scqilin.github.io/learning-threejs-third/assets/models/CesiumMan/CesiumMan.gltf',
    //   },
    //   scale: {
    //     x: 1,
    //     y: 1,
    //     z: 1,
    //   },
    //   position: {
    //     x: 0,
    //     y: 0,
    //     z: 0,
    //   },
    //   rotation: {
    //     x: 0,
    //     y: 0,
    //     z: 0
    //   }
    // },
    // {
    //   name: '3d模型03',
    //   userData: {
    //     is3Dmode: true,
    //     url: './static/models/animate.gltf',
    //   },
    //   scale: {
    //     x: 1,
    //     y: 1,
    //     z: 1,
    //   },
    //   position: {
    //     x: 0,
    //     y: 0,
    //     z: 0,
    //   },
    //   rotation: {
    //     x: 0,
    //     y: 0,
    //     z: 0
    //   }
    // },
    // {
    //   name: '3d模型04',
    //   userData: {
    //     is3Dmode: true,
    //     url: './static/models/man.gltf',
    //   },
    //   scale: {
    //     x: 1,
    //     y: 1,
    //     z: 1,
    //   },
    //   position: {
    //     x: 0,
    //     y: 0,
    //     z: 0,
    //   },
    //   rotation: {
    //     x: 0,
    //     y: 0,
    //     z: 0
    //   }
    // }
  ],
};

export const modelsList = [
  {
    name: '水泵房模型',
    userData: {
      modeId: '',
      is3Dmode: true,
      url: './static/models/水系统20220612.gltf',
    },
    scale: {
      x: 1,
      y: 1,
      z: 1,
    },
    position: {
      x: 0,
      y: 0,
      z: 0,
    },
    rotation: {
      x: 0,
      y: 0,
      z: 0,
    },
  },
  {
    name: '3d模型02',
    userData: {
      modeId: '',
      is3Dmode: true,
      url: './static/models/animate.gltf',
    },
    scale: {
      x: 1,
      y: 1,
      z: 1,
    },
    position: {
      x: 0,
      y: 0,
      z: 0,
    },
    rotation: {
      x: 0,
      y: 0,
      z: 0,
    },
  },
  {
    name: '锅炉房场景',
    userData: {
      modeId: '',
      is3Dmode: true,
      url: './static/models/水泵房场景01.gltf',
    },
    scale: {
      x: 1,
      y: 1,
      z: 1,
    },
    position: {
      x: 0,
      y: 0,
      z: 0,
    },
    rotation: {
      x: 0,
      y: 0,
      z: 0,
    },
  },
  {
    name: '3d模型03',
    userData: {
      modeId: '',
      is3Dmode: true,
      url: 'https://threejs.org/examples/models/gltf/RobotExpressive/RobotExpressive.glb',
    },
    scale: {
      x: 1,
      y: 1,
      z: 1,
    },
    position: {
      x: 0,
      y: 0,
      z: 0,
    },
    rotation: {
      x: 0,
      y: 0,
      z: 0,
    },
  },
  {
    name: '3d头盔模型',
    userData: {
      modeId: '',
      is3Dmode: true,
      url: 'https://threejs.org/examples/models/gltf/DamagedHelmet/glTF/DamagedHelmet.gltf',
    },
    scale: {
      x: 1,
      y: 1,
      z: 1,
    },
    position: {
      x: 0,
      y: 0,
      z: 0,
    },
    rotation: {
      x: 0,
      y: 0,
      z: 0,
    },
  },
  {
    name: '3d模型茶壶',
    userData: {
      modeId: '',
      is3Dmode: true,
      url: './static/models/max场景1.gltf',
    },
    scale: {
      x: 1,
      y: 1,
      z: 1,
    },
    position: {
      x: 0,
      y: 0,
      z: 0,
    },
    rotation: {
      x: 0,
      y: 0,
      z: 0,
    },
  },
  {
    name: '原理模型（水）炸开1.gltf',
    userData: {
      modeId: '',
      is3Dmode: true,
      url: './static/models/原理模型（水）炸开1.gltf',
    },
    scale: {
      x: 1,
      y: 1,
      z: 1,
    },
    position: {
      x: 0,
      y: 0,
      z: 0,
    },
    rotation: {
      x: 0,
      y: 0,
      z: 0,
    },
  },
  {
    name: '3d模型茶壶06',
    userData: {
      modeId: '',
      is3Dmode: true,
      url: './static/models/chahu2.gltf',
    },
    scale: {
      x: 1,
      y: 1,
      z: 1,
    },
    position: {
      x: 0,
      y: 0,
      z: 0,
    },
    rotation: {
      x: 0,
      y: 0,
      z: 0,
    },
  },
  {
    name: '动画demo',
    userData: {
      modeId: '',
      is3Dmode: true,
      url: './static/models/动画demo.gltf',
    },
    scale: {
      x: 1,
      y: 1,
      z: 1,
    },
    position: {
      x: 0,
      y: 0,
      z: 0,
    },
    rotation: {
      x: 0,
      y: 0,
      z: 0,
    },
  },
  {
    name: '箱子模型',
    userData: {
      modeId: '',
      is3Dmode: true,
      url: './static/models/box.gltf',
    },
    scale: {
      x: 1,
      y: 1,
      z: 1,
    },
    position: {
      x: 0,
      y: 0,
      z: 0,
    },
    rotation: {
      x: 0,
      y: 0,
      z: 0,
    },
  },
  {
    name: '展会舞台',
    userData: {
      modeId: '',
      is3Dmode: true,
      url: './static/models/展会舞台.gltf',
    },
    scale: {
      x: 1,
      y: 1,
      z: 1,
    },
    position: {
      x: 0,
      y: 0,
      z: 0,
    },
    rotation: {
      x: 0,
      y: 0,
      z: 0,
    },
  },
  {
    name: '展会舞台',
    userData: {
      modeId: '',
      is3Dmode: true,
      url: './static/models/展会舞台.gltf',
    },
    scale: {
      x: 1,
      y: 1,
      z: 1,
    },
    position: {
      x: 0,
      y: 0,
      z: 0,
    },
    rotation: {
      x: 0,
      y: 0,
      z: 0,
    },
  },
  {
    name: '水系统20220621.gltf',
    userData: {
      modeId: '',
      is3Dmode: true,
      url: './static/models/锅炉房/水系统20220621.gltf',
    },
    scale: {
      x: 1,
      y: 1,
      z: 1,
    },
    position: {
      x: 0,
      y: 0,
      z: 0,
    },
    rotation: {
      x: 0,
      y: 0,
      z: 0,
    },
  },
  {
    name: '水系统20220621无树.gltf',
    userData: {
      modeId: '',
      is3Dmode: true,
      url: './static/models/锅炉房/水系统20220621无树.gltf',
    },
    scale: {
      x: 1,
      y: 1,
      z: 1,
    },
    position: {
      x: 0,
      y: 0,
      z: 0,
    },
    rotation: {
      x: 0,
      y: 0,
      z: 0,
    },
  },
  {
    name: '水系统20220620无路灯树一层.gltf',
    userData: {
      modeId: '',
      is3Dmode: true,
      url: './static/models/锅炉房/水系统20220620无路灯树一层.gltf',
    },
    scale: {
      x: 1,
      y: 1,
      z: 1,
    },
    position: {
      x: 0,
      y: 0,
      z: 0,
    },
    rotation: {
      x: 0,
      y: 0,
      z: 0,
    },
  },
  {
    name: '水系统20220620无路灯树二层.gltf',
    userData: {
      modeId: '',
      is3Dmode: true,
      url: './static/models/锅炉房/水系统20220620无路灯树二层.gltf',
    },
    scale: {
      x: 1,
      y: 1,
      z: 1,
    },
    position: {
      x: 0,
      y: 0,
      z: 0,
    },
    rotation: {
      x: 0,
      y: 0,
      z: 0,
    },
  },
  {
    name: '水系统20220620无路灯树(1).gltf',
    userData: {
      modeId: '',
      is3Dmode: true,
      url: './static/models/锅炉房/水系统20220620无路灯树一层.gltf',
    },
    scale: {
      x: 1,
      y: 1,
      z: 1,
    },
    position: {
      x: 0,
      y: 0,
      z: 0,
    },
    rotation: {
      x: 0,
      y: 0,
      z: 0,
    },
  },
  {
    name: '路灯.gltf',
    userData: {
      modeId: '',
      is3Dmode: true,
      url: './static/models/锅炉房/路灯.gltf',
    },
    scale: {
      x: 1,
      y: 1,
      z: 1,
    },
    position: {
      x: 0,
      y: 0,
      z: 0,
    },
    rotation: {
      x: 0,
      y: 0,
      z: 0,
    },
  },
  {
    name: '树.gltf',
    userData: {
      modeId: '',
      is3Dmode: true,
      url: './static/models/锅炉房/树2.gltf',
    },
    scale: {
      x: 1,
      y: 1,
      z: 1,
    },
    position: {
      x: 0,
      y: 0,
      z: 0,
    },
    rotation: {
      x: 0,
      y: 0,
      z: 0,
    },
  },
  {
    name: '给水所3d模型',
    userData: {
      modeId: '',
      is3Dmode: true,
      url: './static/models/锅炉房/sbf.gltf',
    },
    scale: {
      x: 1,
      y: 1,
      z: 1,
    },
    position: {
      x: 0,
      y: 0,
      z: 0,
    },
    rotation: {
      x: 0,
      y: 0,
      z: 0,
    },
  },
];
